package cn.xd.itstack.springframework.beans.factory;

import cn.xd.itstack.springframework.beans.BeansException;
import cn.xd.itstack.springframework.beans.factory.support.BeanDefinitionRegistry;

import java.util.Map;

/**
 * @Classname ListableBeanFactory
 * @Description TODO
 * @Date 2022/5/17 下午6:12
 * @Created by lvxiaodong
 */
public interface ListableBeanFactory extends BeanFactory {

    /**
     * 按照类型返回 Bean 实例
     * @param type
     * @param <T>
     * @return
     * @throws BeansException
     */
    <T> Map<String, T> getBeansOfType(Class<T> type) throws BeansException;

    /**
     * 获取注册表中所有的BeanName
     * @return
     */
    String[] getBeanDefinitionNames();




}
